<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="refresh" content="5;url=js01_01.html">


</head>
<body onload="method01()">
系统正在运行中，<span id="myspan">5</span>秒之后会自动跳转……
</body>
</html>

<title>10秒跳转</title>
<script type="text/javascript">
    var initValue=5;
    //实现span里的内容减去1
    function method01(){
        var spanElement=document.getElementById('myspan');
        spanElement.innerHTML=initValue;
        initValue--;
        if(initValue<=0){
            //清除定时器
            window.clearInterval(interval);
        }
    }

    var  interval=window.setInterval('method01()',1*1000);

</script>